runOnStartup(async runtime => {
    window.addEventListener("minerTick", (e) => {
    })
    window.addEventListener("minerInit", (e) => {
        mh_miner_eff.PerformingEffect()
    })
});
export class mh_miner_eff {
    static PerformingEffect() {
        //todo: wait event
        this.Luminouseffect()
    }
    static Luminouseffect() {
        var Mineral = runtime.objects.f_miner
        Mineral.addEventListener("instancecreate", function instancecreat(e) {
            /**
             * @type {ISpriteInstance}
             */
            var miner = e.instance
            var miner_type = miner.instVars.type
            /**
             * 只对特殊的矿物执行发光特效
             */
            if (miner_type == "Gldon") {
                var eff = runtime.objects.Minereff2.createInstance("Miner", miner.x, miner.y)
                miner.addChild(eff, {
                    transformX: true,
                    transformY: true,
                    transformWidth: false,
                    transformHeight: false,
                    transformAngle: true,
                    transformZElevation: true,
                    destroyWithParent: true
                })
                eff.moveToBottom()
            }
        })
    }
}
